var produceInfo = new Vue({
	el: '#produceInfo',
	data: {
		area: [],
		areaname: '',
		photocount: 0,
		breeds:[],
		plants:[]
	},
	watch: {
		//监听区域变化　　　　　
		areaname: function(curVal, oldVal) {
			this.getData()
		}　
	},
	mounted: function() {
	

	},
	methods: {
		getData:function(){
			var _this = this
			var areastr = '';
			for(var i = 0; i < this.area.length; i++) {
				if(i == 0) {
					areastr = this.area[i]
				} else {

					areastr = areastr + "," + this.area[i]
				}

			}
				axios({
				url: sever + '/produceAnalysisList',
				method: 'POST',
				// 请求体重发送的数据
				params: {
					"area": areastr
				},
				timeout: 50000,
				// 设置请求头
				headers: {
					'Content-Type': 'application/x-www-form-urlencoded'
				}
			}).then(function(res){ 
				console.log(res.data)
				_this.breeds = res.data.breeds
				_this.plants = res.data.plants
			})
		}
	},
});